#ifndef CHAT_SERVER_H
#define CHAT_SERVER_H

#include <iostream>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>

#include "GameMessage.h"
#include "Connection.h"
#include "GameRoom.h"


using boost::asio::ip::tcp;

class GameServer
{
public:
        GameServer(boost::asio::io_service& io_service, const tcp::endpoint& endpoint);
		
	void	wait_for_connection		();

private:
	void	handle_accept			(const boost::system::error_code& error, connection_ptr);

	boost::asio::io_service&		m_io_service;
	tcp::acceptor					m_acceptor;
	chat_room_ptr					m_room;
};



#endif
